﻿<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>Golf</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src="Js/jquery-1.4.1.min.js" type="text/javascript"></script>
		
		<style type="text/css"> 
		<!--
		body {
			background-color: #000000;
			margin-left: 0px;
			margin-top: 0px;
			margin-right: 0px;
			margin-bottom: 0px;
		}
		-->
		</style>
			
	<script language="JavaScript">
		function thisMovie(movieName) {
			if (navigator.appName.indexOf("Microsoft") != -1) {
				return window[movieName];
			} else {
			    return document[movieName];
			}
		}
		function sendToActionScript() {
		    thisMovie("movie").sendToActionScript();
		}
		 
		function sg() {
		    //var huidiao=funciton(){sendToActionScript();};
		    //alert(CheckLogin())
		    if (CheckLogin() == 0) {
		        //alert("ggggg");
		        var url = "https://api.weibo.com/oauth2/authorize?" + "client_id=1367773998&response_type=token&redirect_uri=http://importgolf.ogilvy.com.cn/sinaEnter.html";
		        window.open(url, "newlogin", "height=480,width=640");
		    } else {
		        sendToActionScript();
		    }
            
			//sendToActionScript();
        }
        var CheckLogin = function () {
            var returnstatus = 0;
            $.ajax({
                type: "GET",
                url: "GateService.aspx",
                dataType: "text",
                async:false,
                data: "cmd=checklogin&random=" + new Date().toLocaleString(),
                beforeSend: function (xmlHttpRequest) {
                },
                success: function (data, textStatus) {
                    //alert(data);
                    var status = parseInt(data);
                    returnstatus = status;

                },
                complete: function (xmlHttpRequest, textStatus) {

                },
                error: function () {
                    alert("error");
                }
            });
            return returnstatus;
        }
	</script>
    </head>
    <body scroll="no" >
		
	
		
		<div id="info">
		  <div align="center">
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="movie" width=100% height=100% codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" align="middle">
				<param name="movie" value="main.swf" />
				<param name="wmode" value="direct" />
				<param name="quality" value="high" />
				<param name="allowScriptAccess" value="always" />
				
				<embed src="main.swf" wmode="direct" quality="high"
					width=100% height=100% name="movie" align="middle"
					play="true" loop="false" quality="high" allowScriptAccess="always"
					type="application/x-shockwave-flash"
					pluginspage="http://www.macromedia.com/go/getflashplayer">
				</embed>
			</object>
		  </div>
		</div>
		
		
    </body>
</html>